<template>
    <div id="main" class="app-main">
        <router-view />
    </div>
</template>
<script>
export default {
    name: 'app',
    components: {

    },
    mounted: function() {
        let u = navigator.userAgent;
        let flag = !!u.match(/AppleWebKit.*Mobile.*/);

        this.$store.commit("setMobile", flag);

        window.addEventListener('beforeunload', this.handleBeforeUnload);
    },
    beforeDestroy() {
        // 移除事件监听
        window.removeEventListener('beforeunload', this.handleBeforeUnload);
    },
    methods: {
        handleBeforeUnload(event) {
            const message = '您确定要离开此页面吗？';
            event.returnValue = message; // 标准的跨浏览器兼容性处理
            return message; // 为了某些浏览器的兼容性而返回信息
        }
    },
    watch: {
        '$route'(to) {



        }
    }
}
</script>
<style>
.vantcontent {
    position: absolute;
    top: 50px;
    bottom: 50px;
    left: 0px;
    right: 0px;
    overflow-y: scroll;
}

.ivu-menu-vertical .ivu-menu-item-group-title {
    background-color: rgb(56 62 76);
}

html,
body {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    overflow: hidden;
}

.el-tag {
    margin-bottom: 10px;
}

.btline {
    margin-bottom: 10px;
}

.ivu-layout {
    height: 100%;
}

.ivu-table {
    height: auto;
}

.layout-logo {
    background: #17233d;
    color: #fff;
    height: 60px;



    position: relative;
    text-align: center;
    padding: 10px;
}

.layout-nav {
    margin: 0 20px 0 200px;
}

.layout-main {
    padding: 24px;

    background-color: #fff;
    margin: 0px 10px 24px 10px;
}

.layout-main-1 {
    padding: 24px 0px;
    margin-bottom: 24px;
    background-color: #fff;
}

.ivu-layout-footer {
    text-align: left;
    width: 200px;
    position: fixed;
    left: 0px;
    z-index: 9;
    bottom: 0px;

}

.el-button {
    position: relative;
}

.el-button .el-badge {
    position: absolute;
    top: -5px;
    right: -5px;
}

.ivu-btn {
    margin-right: 10px;
}

.ivu-table {
    height: auto;
}

.app-main {
    width: 100%;
    height: 100%;
    overflow: scroll;
}

.tips {
    color: #ff9900;
    font-size: 16px;
}

.tips.success {
    color: #19be6b
}

.tips.error {
    color: #ed4014
}

.tips.info {
    color: #2db7f5
}

.ivu-alert {
    font-size: 14px;
    line-height: 20px;
}

.state-success-full {
    background: #19be6b;

    color: #fff;
    padding: 5px;
}

.state-primary-full {
    background: #2d8cf0;
    padding: 5px;
    color: #fff;
}

.state-warning-full {
    background: #ff9900;

    color: #fff;
    padding: 5px;
}

.state-error-full {
    padding: 5px;
    background: #ed4014;

    color: #fff;
}

.state-info-full {
    background: #2db7f5;
    padding: 5px;

    color: #fff;
}

.state-holder-full {
    color: rgba(0, 0, 0, 0.5);
    background-color: #f7f7f7;
    padding: 5px;
}

.state-default {

    color: #17233d;
}

.state-success {
    color: #67C23A;

}

.state-primary {
    color: #2d8cf0;

}

.state-warning {
    color: #ff9900;

}

.state-error {
    color: #ed4014;

}

.state-info {
    color: #2db7f5;

}



.state-default-border {
    padding: 0px 5px;
    color: #17233d;
    border: 1px solid #17233d;
}

.state-success-border {
    color: #19be6b;
    padding: 0px 5px;
    border: 1px solid #19be6b;

}

.state-primary-border {
    color: #2d8cf0;
    padding: 0px 5px;
    border: 1px solid #2d8cf0;

}

.state-warning-border {
    color: #ff9900;
    padding: 0px 5px;
    border: 1px solid #ff9900;

}

.state-error-border {
    color: #ed4014;
    padding: 0px 5px;
    border: 1px solid #ed4014;

}

.state-info-border {
    color: #2db7f5;
    padding: 0px 5px;
    border: 1px solid #2db7f5;

}

.order-list {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.orderitem {

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;

    padding: 5px 0px;
    border-bottom: 1px dotted #cecece;
}



.info {
    background: #2db7f5;
}

.success {
    background: #19be6b
}

.warning {
    background: #ff9900
}

.error {
    background: #ed4014
}

.primary {
    background: #2d8cf0
}


.ivu-table .demo-table-error-row td {
    color: #ed4014;

}

.ivu-table .demo-table-warn-row td {
    color: #ff9900;

}

.el-tag {
    cursor: pointer;
    margin-right: 5px;
}

.el-alert {
    margin-bottom: 10px;
}

.search .el-select .el-input {
    width: 130px;
}

.search .input-with-select .el-input-group__prepend {
    /*background-color: #fff;*/
}

.search .el-form-item {
    margin-bottom: 0px;
}



#mileBind .el-card__body {
    padding: 5px 5px;
}

#mileBind .el-card__header {
    padding: 5px 5px;
}

.sidebar-menu-con::-webkit-scrollbar {
    width: 0;
}

.sidebar-menu-con::-webkit-scrollbar-thumb {
    background: #e8eaec;
}

.r-kanban-view__card-body::-webkit-scrollbar-track {
    background-color: transparent;
}

.r-kanban-view__card-body::-webkit-scrollbar {
    width: 0;
}

.r-kanban-view__card-body::-webkit-scrollbar-thumb {
    background: #e8eaec;
}

.r-kanban-view__card-body::-webkit-scrollbar-track {
    background-color: transparent;
}


.pm-file-upload,
.pm-file-upload .el-upload {
    width: 100%;
    display: block;
}

.pm-file-upload .el-upload-dragger .el-icon-upload {
    margin: 20px;
}

.pm-file-upload .el-upload-dragger {
    width: 100%;
    height: auto;
}

.pm-list {}

.pm-list li {

    display: flex;
    line-height: 20px;
    padding: 10px 5px;
    padding-left: 2px;
    font-size: 16px;

}

.pm-list li[data-priority='1'] {
    border-left: 4px solid #67c23a;
}

.pm-list li[data-priority='0'] {
    border-left: 4px solid #409EFF;
}

.pm-list li[data-priority='-1'] {
    border-left: 4px solid #df5246;
}

.pm-list li:hover,
.pm-list li.selected {
    background-color: #eeeeee;
}

.pm-list li span.name {

    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 1px;
    cursor: pointer;
    /*overflow: hidden;*/
    /*white-space: nowrap;*/
    /*text-overflow: ellipsis;*/
    word-wrap: break-word;
    word-break: normal;
}

.pm-list li i {
    font-size: 18px;
    margin-right: 5px;
}

.pm-list li i.el-icon-star-on.icon-red {
    color: #ff0000;

}

.pm-list li i.el-icon-star-on.icon-red:before {}


.cus-footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    overflow: hidden;
}

.cus-footer-left {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 1px;
    overflow: hidden;
    text-align: left;

}

.el-tag+.el-tag {
    margin-left: 10px;
}

.button-new-tag {
    margin-left: 10px;
    height: 32px;
    line-height: 30px;
    padding-top: 0;
    padding-bottom: 0;
}

.input-new-tag {
    width: 90px;
    margin-left: 10px;
    vertical-align: bottom;
}


.r-main-board {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.r-main-board__toolbar {
    height: 64px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    background: #fff;
}

.r-main-board__app-container {
    position: relative;
    flex: 1;
    height: calc(100% - 64px);
    height: calc(100% - var(--main-frame-header-height));
}


.r-home__sidebar {
    position: absolute !important;
    left: 0;
    top: 0;
    bottom: 0;
    background: #fff;
    width: 172px;
    overflow: scroll;
    -webkit-box-shadow: 1px 0 0 0 #e3e3e3;
    box-shadow: 1px 0 0 0 #e3e3e3;
    -webkit-transition: width .2s ease-in-out;
    transition: width .2s ease-in-out;
}

.r-home__sidebar::-webkit-scrollbar {
    width: 0px;
}

.r-home__sidebar::-webkit-scrollbar-thumb {
    background: #e8eaec;
}

.r-home__sidebar::-webkit-scrollbar-track {
    background-color: transparent;
}


.r-home__sidebar.v2 {
    left: 173px;
    width: 272px;
}

.r-home__sidebar.v3 {
    width: 272px;
}

.r-home__sidebar__header {
    height: 45px;
    -webkit-box-shadow: 0 1px 0 0 #e3e3e3;
    box-shadow: 0 1px 0 0 #e3e3e3;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    background: #fff;
    width: 100%;
    line-height: 45px;
    padding-left: 10px;
    font-size: 18px;
    display: flex;
}

.r-home__sidebar__header i.create_pm:before {
    display: inline-block;
    line-height: 45px;
    width: 45px;
    text-align: center;
}

.r-home__sidebar__header span.name {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 1px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 16px;
}

.r-home__sidebar-menu {
    height: 40px;
    font-size: 14px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding-left: 8px;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
}


.r-home__sidebar-menu.is-active,
.r-home__sidebar-menu:hover {
    background: rgba(43, 136, 254, .1);
    background: rgba(var(--kite-theme-color-6-rgb), .1);
}

.r-home__sidebar-menu.is-active {
    color: #2b88fe;
    color: var(--kite-theme-color-6);
}

.r-home__create-plan {
    height: 22px;
    line-height: 22px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding-left: 16px;
    cursor: pointer;
    margin-top: 8px;
    margin-bottom: 10px;
}

.r-home__content {
    position: absolute;
    left: 446px;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    -webkit-transition: left .3s ease-in-out;
    transition: left .3s ease-in-out;
}

.r-home__content.v3 {
    left: 273px;
}

.r-content {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

/*.r-content__header,*/
.r-content__header-right {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.r-content__header {
    /*    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;*/
    height: 45px;
    -webkit-box-shadow: 0 1px 0 0 #e3e3e3;
    box-shadow: 0 1px 0 0 #e3e3e3;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    background: #fff;
    width: 100%;
}

.r-content__header i {
    font-size: 18px;
}

.r-content__header i:before {
    display: inline-block;
    line-height: 45px;
    width: 45px;
    text-align: center;
    cursor: pointer;
}

.r-content__body {
    position: absolute !important;
    top: 45px;
    bottom: 0;
    left: 0;
    right: 0;
}

.r-content__body.v3 {
    top: 0px;
}

.r-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.r-empty__tip {
    margin: 0;
    color: #666;
    line-height: 22px;
    margin-top: 12px;
    text-align: center;
}

.r-kanban-view {
    width: 100%;
    height: 100%;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
}


.r-kanban-view__card-list,
.r-kanban-view__card-wrap,
.r-kanban-view__card-list>div {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.r-kanban-view__card-list {
    padding-left: 16px;

}



.r-kanban-view__card-wrap {
    position: absolute;
    top: 16px;
    bottom: 12px;
}

.r-kanban-view__card-wrap.sub {
    position: relative;
    top: 0px;
    bottom: 0px;
    padding-bottom: 12px;
}

.r-kanban-view__card {
    width: 272px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    position: relative;
    border: 1px solid transparent;
    border-radius: 8px;
}

.r-kanban-view__card:hover {
    border-color: #e3e3e3;
}

.r-kanban-view__card-header {
    height: 42px;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.r-kanban-view__card-header,
.r-kanban-view__card-mask {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.r-kanban-view__card-batch,
.r-kanban-view__card-header-left,
.r-kanban-view__card-header-right {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.r-kanban-view__card-header-left,
.r-kanban-view__card-header-right {
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    margin-left: 16px;
}

.r-kanban-view__card-header-right {
    margin-right: 16px;
}

.r-kanban-view__card-rename {
    width: 100%;
    height: 100%;
    margin: auto 10px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.r-kanban-view__card-header-right i:before {
    display: inline-block;
    line-height: 42px;
    width: 30px;
    text-align: center;
}

.r-kanban-view__card-body {
    max-height: calc(100% - 70px);
    overflow: hidden;
    overflow-y: auto;
    position: relative;
}

.r-kanban-view__card-body--show-foot {
    max-height: calc(100% - 112px);
}

.r-kanban-view__card-body.sub {
    max-height: none;
}

.r-kanban-view__card-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 140px;
    cursor: pointer;
    margin-left: 5px;
}

.r-card-add {
    width: 248px;
    height: 32px;
    margin-top: 42px;
    margin-left: 12px;
    background: #fff;
    -webkit-box-shadow: 0 2px 6px rgb(0 0 0 / 10%);
    box-shadow: 0 2px 6px rgb(0 0 0 / 10%);
    border-radius: 4px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    margin-right: 16px;
}

.r-kanban-view__card-bottom {
    margin: 10px auto 0;
    height: 32px;
    background: #fff;
    -webkit-box-shadow: 0 2px 6px rgb(0 0 0 / 10%);
    box-shadow: 0 2px 6px rgb(0 0 0 / 10%);
    border-radius: 4px;
    width: 248px;
    color: #999;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    letter-spacing: .2625px;
    cursor: pointer;
}

.r-kanban-view__card-bottom-empty {
    margin-top: 0;
}

.r-kanban-view__card-bottom:hover {
    color: #409EFF;
}

.k-select-panel {
    position: relative;
    width: 180px;
    background-color: #fff;
    border-radius: 3px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 10%);
}

.k-select-panel__select-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.k-select-panel__item {
    display: flex;
    align-items: center;
    height: 40px;
    line-height: 32px;
    margin-top: 0;
    padding: 0 20px;
    cursor: pointer;
    position: relative;
}

.k-select-panel__item-name-container {
    color: #585858;
    display: flex;
    width: 100%;
    flex: 1;
    flex-flow: column;
}

.r-kanban-view__task-list {
    height: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.task-tag-priority {
    margin-left: 10px;
    position: relative;
    padding-left: 2px;
}


.task-tag-priority[data-priority="1"] {
    border-left: 8px solid #df5246;
}

.task-tag-priority[data-priority="2"] {
    border-left: 8px solid #fdaa00;
}

.task-tag-priority[data-priority="3"] {
    border-left: 8px solid #4c8bf5;
}

.task-tag-priority[data-priority="4"] {
    border-left: 8px solid #18a05e;
}

.warn-level {
    color: #FFFFFF;
    padding: 5px;
    border-radius: 3px;
}

.warn-level[data-priority="1"] {
    background-color: #df5246;
}

.warn-level[data-priority="2"] {
    background-color: #fdaa00;
}

.warn-level[data-priority="3"] {
    background-color: #4c8bf5;
}

.warn-level[data-priority="4"] {
    background-color: #18a05e;
}

.k-task-detail__body {
    display: flex;
    overflow: hidden;
    height: 100%;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/*width: calc(100% - var(--left-with));*/
.k-task-detail__body-left {

    overflow-y: auto;
    border-bottom-left-radius: 4px;
    padding: 0 32px 32px 32px;

    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 1px;
    overflow: hidden;
    text-align: left;
}

.k-task-detail__body-right {
    width: 440px;
    border-bottom-right-radius: 4px;
    background-color: #fff;
    border-left: 1px solid #eaeaea;
    position: relative;
    border-right: 1px solid #eaeaea;
}

.k-task-detail__body-right .right-scroll-container {
    overflow-y: auto;
    /* height: calc(100% - var(--rightScrollHeight));**/
}

.k-task-detail__body-right .right-scroll-container .k-participant {
    border-bottom: 1px solid #eaeaea;
    background-color: #fff;
}

.k-participant {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    width: 100%;
    background-color: #f9f9fa;
    color: #bfbfbf;
    padding: 20px 24px;
}

.k-participant .title-name {
    margin: 0px 5px;
}

.k-trend {
    position: relative;
    flex: 1;
    color: #8c8c8c;
    background: #fff;
    padding-left: 10px;
    padding-right: 10px;
}

.el-tabs__content {
    min-height: 300px;

}

.el-tree-node {}

.el-tree-node__content {}

.custom-tree-node {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    padding-right: 5px;

}

.custom-tree-node .name {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    font-size: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.custom-tree-node i {
    width: 20px;
    display: inline-block;
    font-size: 14px;
    margin-top: 5px;
}

.task-todo-list {}

.task-todo-list li {
    padding: 10px 10px 10px 0px;
    border-bottom: 1px dotted #cccccc;
    cursor: pointer;
}

.task-todo-list li:hover {
    outline: 0;
    background-color: #ecf5ff;
}

.mytable {
    width: 100%;
    border-color: #999999;
    border-collapse: collapse;
    text-align: center;
}

.mytable th {
    background-color: #eeeeee;
}

.mytable th,
.mytable td {
    padding: 5px;
    font-size: 14px;
}

::-webkit-scrollbar {
    width: 0;
}

::-webkit-scrollbar-thumb {
    background: #e8eaec;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}
</style>